<!DOCTYPE html><html lang="zh-Hans"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><meta name="description" content="Mac 快捷键"><meta name="keywords" content="Mac"><meta name="author" content="kyren"><meta name="copyright" content="kyren"><title>Mac 快捷键 | Kyren's Blog</title><link rel="shortcut icon" href="/melody-favicon.ico"><link rel="stylesheet" href="/css/index.css?version=1.9.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css?version=1.9.0"><meta name="format-detection" content="telephone=no"><meta http-equiv="x-dns-prefetch-control" content="on"><link rel="dns-prefetch" href="https://cdn.jsdelivr.net"><link rel="dns-prefetch" href="https://hm.baidu.com"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?cf87fcdbd9ab7cf93d894f7c219ae78f";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();</script><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><script src="https://v1.hitokoto.cn/?encode=js&amp;charset=utf-8&amp;select=.footer_custom_text" defer></script><script>var GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容:${query}"}},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  hexoVersion: '6.2.0'
} </script><meta name="generator" content="Hexo 6.2.0"></head><body><i class="fa fa-arrow-right" id="toggle-sidebar" aria-hidden="true"></i><div id="sidebar" data-display="true"><div class="toggle-sidebar-info text-center"><span data-toggle="切换文章详情">切换站点概览</span><hr></div><div class="sidebar-toc"><div class="sidebar-toc__title">目录</div><div class="sidebar-toc__progress"><span class="progress-notice">你已经读了</span><span class="progress-num">0</span><span class="progress-percentage">%</span><div class="sidebar-toc__progress-bar"></div></div><div class="sidebar-toc__content"><ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#Mac-%E5%BF%AB%E6%8D%B7%E9%94%AE"><span class="toc-number">1.</span> <span class="toc-text">Mac 快捷键</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#Chrome"><span class="toc-number"></span> <span class="toc-text">Chrome</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#iTerm2"><span class="toc-number"></span> <span class="toc-text">iTerm2</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#Xcode"><span class="toc-number">1.</span> <span class="toc-text">Xcode</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%80%E3%80%81%E7%BC%96%E7%A0%81%E5%BF%AB%E6%8D%B7%E9%94%AE"><span class="toc-number">2.</span> <span class="toc-text">一、编码快捷键</span></a><ol class="toc-child"><li class="toc-item toc-level-4"><a class="toc-link" href="#1-%E4%B8%8A%E4%B8%8B%E5%B7%A6%E5%8F%B3-%E7%A7%BB%E5%8A%A8%E9%80%89%E4%B8%AD%E4%BB%A3%E7%A0%81"><span class="toc-number">2.1.</span> <span class="toc-text">1. 上下左右 移动选中代码</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#2-%E5%85%89%E6%A0%87%E7%9B%B8%E5%85%B3%E6%93%8D%E4%BD%9C"><span class="toc-number">2.2.</span> <span class="toc-text">2.光标相关操作</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#3-%E4%B8%80%E6%AC%A1%E6%80%A7%E4%BF%AE%E6%94%B9%E4%B8%80%E4%B8%AA-Scope-%E9%87%8C%E7%9A%84%E5%8F%98%E9%87%8F%E5%90%8D%EF%BC%9A"><span class="toc-number">2.3.</span> <span class="toc-text">3. 一次性修改一个 Scope 里的变量名：</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#4-%E5%BF%AB%E6%8D%B7%E6%90%9C%E7%B4%A2%EF%BC%9A"><span class="toc-number">2.4.</span> <span class="toc-text">4. 快捷搜索：</span></a></li></ol></li></ol></div></div><div class="author-info hide"><div class="author-info__avatar text-center"><img src="https://avatars.githubusercontent.com/u/5827823?v=4"></div><div class="author-info__name text-center">kyren</div><div class="author-info__description text-center">huluo的技术博客</div><div class="follow-button"><a target="_blank" rel="noopener" href="https://github.com/huluo666">Follow Me</a></div><hr><div class="author-info-articles"><a class="author-info-articles__archives article-meta" href="/archives"><span class="pull-left">文章</span><span class="pull-right">239</span></a><a class="author-info-articles__tags article-meta" href="/tags"><span class="pull-left">标签</span><span class="pull-right">41</span></a><a class="author-info-articles__categories article-meta" href="/categories"><span class="pull-left">分类</span><span class="pull-right">29</span></a></div><hr><div class="author-info-links"><div class="author-info-links__title text-center">Links</div><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://192.168.2.212:9090/">Jira</a><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://192.168.2.212:8090/">Confluence</a><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://bloc.leniugame.com/">Leniu</a></div></div></div><div id="content-outer"><div class="no-bg" id="top-container"><div id="page-header"><span class="pull-left"> <a id="site-name" href="/">Kyren's Blog</a></span><i class="fa fa-bars toggle-menu pull-right" aria-hidden="true"></i><span class="pull-right menus">   <a class="site-page" href="/">主页</a><a class="site-page" href="/essay">随笔</a><a class="site-page" href="/archives">归档</a><a class="site-page" href="/tags">标签</a><a class="site-page" href="/categories">分类</a><a class="site-page" href="/about">关于</a></span><span class="pull-right"><a class="site-page social-icon search"><i class="fa fa-search"></i><span> 搜索</span></a></span></div><div id="post-info"><div id="post-title">Mac 快捷键</div><div id="post-meta"><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2016-04-07</time><span class="post-meta__separator">|</span><i class="fa fa-inbox post-meta__icon" aria-hidden="true"></i><a class="post-meta__categories" href="/categories/%E5%BF%AB%E6%8D%B7%E9%94%AE/">快捷键</a></div></div></div><div class="layout" id="content-inner"><article id="post"><div class="article-container" id="post-content"><h3 id="Mac-快捷键"><a href="#Mac-快捷键" class="headerlink" title="Mac 快捷键"></a><code>Mac 快捷键</code></h3><p><strong>快捷键提醒神器</strong><a target="_blank" rel="noopener" href="http://www.ifunmac.com/2014/04/cheatsheet/">CheatSheet</a></p>
<p><img src="http://7xr7vj.com1.z0.glb.clouddn.com/2016/04/07/FpDHxuwtw8QnyFiiXnVcrh-KGx0x126.jpg" alt="Mac 键盘"></p>
<p><strong>截图</strong></p>
<p><code>Shift+Command+3</code>   	 		 截取全屏幕至桌面<br><code>Shift+Command+4</code>    			 截取部分屏幕至桌面<br><code>Shift+Command+4+空格</code>  		 截取窗口或原件至桌面<br><code>Shift+Command+4 然后Esc</code> 	 退出截屏<br><code>Shift+Command+Control+3</code> 	 截取全屏幕至剪贴板<br><code>Shift+Command+Control+4</code> 	 截取部分屏幕至剪贴板</p>
<p><code>Shift+Command+Control+4+空格</code> 			截取窗口或原件至剪贴板<br><code>Shift+Command+4 拉出选框</code> 然后 <code>空格</code>	 	移动选框<br><code>Shift+Command+4</code> 然后 <code>Shift</code> 			保持选框高度（宽度），修改宽度（高度）<br><code>Shift+Command+4</code> 然后 <code>Option</code> 			保持选框中心，修改半径</p>
<h2 id="Chrome"><a href="#Chrome" class="headerlink" title="Chrome"></a><code>Chrome</code></h2><ol>
<li><strong>Command + l 焦点移动到地址栏</strong></li>
<li><strong>Shift + Option + Delete&#x2F;Left</strong> 向左删除&#x2F;选中一个单词（可以自定义为 <code>Ctrl-w</code>）</li>
<li><code>Command + y</code> 搜索历史</li>
<li><strong>Command + 数字 快速切换 tab</strong></li>
<li><code>Command + shift + []</code> 左右切换 tab</li>
<li><code>Command + t/w</code> 新建&#x2F;关闭 tab</li>
<li><code>Command + e/g</code> 搜索选中，前往下一个，或者用<code>Command + f</code> 和回车。</li>
</ol>
<h2 id="iTerm2"><a href="#iTerm2" class="headerlink" title="iTerm2"></a><code>iTerm2</code></h2><ol>
<li><strong>Ctrl w 删除前一个单词</strong></li>
<li><code>Command + r</code> 清除屏幕上的内容</li>
<li><code>Command + t/w</code> 打开&#x2F;关闭 tab</li>
<li><strong>Command + 数字 切换到第 n 个 tab</strong></li>
<li><code>双击</code> 选中一个单词，自动复制</li>
</ol>
<p>iTerm 可以通过 <code>Command + shift + []</code> 来左右切换 tab，也可以通过 <code>Command + Left/Right</code> 切换</p>
<h3 id="Xcode"><a href="#Xcode" class="headerlink" title="Xcode"></a><code>Xcode</code></h3><p><img src="http://7xr7vj.com1.z0.glb.clouddn.com/2016/04/07/FsXFpoUh7K1hPA4NzIo9sYXQMxPK864.jpg" alt="Xcode快捷键"></p>
<h3 id="一、编码快捷键"><a href="#一、编码快捷键" class="headerlink" title="一、编码快捷键"></a>一、编码快捷键</h3><h4 id="1-上下左右-移动选中代码"><a href="#1-上下左右-移动选中代码" class="headerlink" title="1. 上下左右 移动选中代码"></a>1. 上下左右 移动选中代码</h4><ul>
<li>代码上移：option + command +[ ;</li>
<li>代码下移：option + command +] ;</li>
<li>代码左缩进 <strong>command + [</strong></li>
<li>代码右缩进 <strong>command + ]</strong></li>
<li>自动排版代码：Xcode默认的是 Control + shift + , 但是为了方便，我推荐重新自定义设置为<strong>Command + &#x3D;</strong></li>
</ul>
<h4 id="2-光标相关操作"><a href="#2-光标相关操作" class="headerlink" title="2.光标相关操作"></a>2.光标相关操作</h4><ul>
<li><p><code>Command + &lt;</code>     		光标跳到行</p>
<ul>
<li><code>Command + &gt;</code>	光标跳到行尾</li>
</ul>
</li>
<li><p><strong><code>Command + 上方向键</code></strong> 光标跳到页面顶部，推荐</p>
</li>
<li><p><code>Command + 下方向键</code>      光标跳到页面底部，推荐</p>
</li>
<li><p><strong>Option + &lt;—</strong> 光标回退到左边一个词组前，推荐</p>
</li>
<li><p><strong>Option + —&gt;</strong> 光标回退右边一个词组尾，推荐</p>
</li>
<li><p><strong>Option + 上方向键</strong> 光标移到上一行最前面，推荐</p>
</li>
<li><p><strong>Option + 下方向键</strong> 光标移到下一行最后面，推荐</p>
</li>
</ul>
<p>Ctrl + A (Ahead),  光标跳到行首</p>
<p>Ctrl + E (End),      光标跳到行尾</p>
<p><strong>Ctrl + B (Back)</strong>, 光标回退一个字符</p>
<p><strong>Ctrl + F (Forward)</strong>,  光标前进一个字符</p>
<p><strong>Ctrl + N (Next)</strong>,  光标跳到下一行</p>
<p><strong>Ctrl + P (Previous)</strong>,  光标跳到上一行</p>
<p>Ctrl + D (), 删除光标右边的一个字符</p>
<p>Ctrl + H (), 删除光标左边的一个字符</p>
<p>Ctrl + K (Kill), 删除光标后面所有内容</p>
<h4 id="3-一次性修改一个-Scope-里的变量名："><a href="#3-一次性修改一个-Scope-里的变量名：" class="headerlink" title="3. 一次性修改一个 Scope 里的变量名："></a>3. 一次性修改一个 Scope 里的变量名：</h4><p>点击该变量，出现下划虚线，然后 <strong>command + control + E</strong> 激活所有相同变量，然后进行修改。</p>
<h4 id="4-快捷搜索："><a href="#4-快捷搜索：" class="headerlink" title="4. 快捷搜索："></a>4. 快捷搜索：</h4><p>先点亮想要搜索的词，然后** Command + E <strong>将该次放入剪贴板，然后使用</strong> Command + G <strong>来向下遍历该词，</strong>Shift + Command + G** 向上遍历。</p>
<p>打开’Show Related Items弹出菜单：Control + 1</p>
<p><strong>常用快捷键</strong></p>
<ul>
<li>项目之间切换 cmd+~</li>
<li>.h和.m之间切换 ctrl+cmd+ ↑ or ↓</li>
<li>定位类文件 cmd+shift+J</li>
<li>类文件查找 cmd+shift+O</li>
<li>方法调用者查看 ctrl+1</li>
<li>类结构预览 ctrl+2</li>
</ul>
</div></article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="mailto:undefined">kyren</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="http://huluo666.gitee.io/2016/04/07/Mac 快捷键/">http://huluo666.gitee.io/2016/04/07/Mac 快捷键/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a target="_blank" rel="noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="http://huluo666.gitee.io">Kyren's Blog</a>！</span></div></div><div class="post-meta__tag-list"><a class="post-meta__tags" href="/tags/Mac/">Mac</a></div><nav id="pagination"><div class="prev-post pull-left"><a href="/2016/04/08/iOS%E7%BB%98%E5%9B%BE%E4%B8%8E%E5%8A%A8%E7%94%BB%E7%B3%BB%E5%88%97%20%E8%B4%9D%E5%A1%9E%E5%B0%94%E6%9B%B2%E7%BA%BFUIBezierPath%EF%BC%88%E4%BA%8C%EF%BC%89/"><i class="fa fa-chevron-left">  </i><span>iOS绘图与动画系列 贝塞尔曲线UIBezierPath（二）</span></a></div><div class="next-post pull-right"><a href="/2016/04/07/iOS%20ViewController%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F/"><span>iOS ViewController生命周期</span><i class="fa fa-chevron-right"></i></a></div></nav></div></div><footer><div class="layout" id="footer"><div class="copyright">&copy;2022 By kyren</div><div class="framework-info"><span>驱动 - </span><a target="_blank" rel="noopener" href="http://hexo.io"><span>Hexo</span></a><span class="footer-separator">|</span><span>主题 - </span><a target="_blank" rel="noopener" href="https://github.com/Molunerfinn/hexo-theme-melody"><span>Melody</span></a></div><div class="footer_custom_text">hitokoto</div><div class="busuanzi"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span id="busuanzi_container_page_pv"><i class="fa fa-file"></i><span id="busuanzi_value_page_pv"></span><span></span></span></div></div></footer><i class="fa fa-arrow-up" id="go-up" aria-hidden="true"></i><script src="https://cdn.jsdelivr.net/npm/animejs@latest/lib/anime.min.js"></script><script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-animate@latest/velocity.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-ui-pack@latest/velocity.ui.min.js"></script><script src="/js/utils.js?version=1.9.0"></script><script src="/js/fancybox.js?version=1.9.0"></script><script src="/js/sidebar.js?version=1.9.0"></script><script src="/js/copy.js?version=1.9.0"></script><script src="/js/fireworks.js?version=1.9.0"></script><script src="/js/transition.js?version=1.9.0"></script><script src="/js/scroll.js?version=1.9.0"></script><script src="/js/head.js?version=1.9.0"></script><script src="/js/search/local-search.js"></script><script>if(/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
  $('#nav').addClass('is-mobile')
  $('footer').addClass('is-mobile')
  $('#top-container').addClass('is-mobile')
}</script><div class="search-dialog" id="local-search"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章"></div></div></div><hr><div id="local-search-results"><div id="local-hits"></div><div id="local-stats"><div class="local-search-stats__hr" id="hr"><span>由</span> <a target="_blank" rel="noopener" href="https://github.com/wzpan/hexo-generator-search" style="color:#49B1F5;">hexo-generator-search</a>
 <span>提供支持</span></div></div></div><span class="search-close-button"><i class="fa fa-times"></i></span></div><div class="search-mask"></div></body></html>